<template>
  <div>
    <!-- 子组件绑定到slot标签上的属性会提供给父组件的作用域插槽 -->
    姓名:
    <slot :info="{ fname: firstName, lname: lastName}">
      {{ firstName + ' ' + lastName }}
    </slot>
  </div>
</template>
<script>
export default {
  name: 'ShowName',
  props: {
    firstName: {
      type: String,
      default: ''
    },
    lastName: {
      type: String,
      default: ''
    }
  }
}
</script>
